package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.wechatwork.wxq.rule.WxqWorkGroupRuleQuery;
import com.uzai.console.entity.WxqWorkGroupRule;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface WxqWorkGroupRuleMapper {
    int deleteById(@Param("id") Long id);

    int deleteByDeiviceUniqueId(@Param("deviceUniqueId") Long deviceUniqueId);

    int insert(WxqWorkGroupRule record);

    int insertSelective(WxqWorkGroupRule record);

    WxqWorkGroupRule selectById(@Param("id") Long id);

    int updateByIdSelective(WxqWorkGroupRule record);

    int updateById(WxqWorkGroupRule record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    List<WxqWorkGroupRule> findByList(Page<WxqWorkGroupRule> page, @Param("query") WxqWorkGroupRuleQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    List<WxqWorkGroupRule> findByList(@Param("query") WxqWorkGroupRuleQuery query);

}